from rest_framework.filters import BaseFilterBackend

class UserFilter(BaseFilterBackend):

    def filter_queryset(self, request, queryset, view):
        queryset = queryset.filter(user_id=request.user.id)
        return queryset